package com.ddone.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ddone
 * @date 2024/4/7-09:44
 */
@FeignClient(value = "spring-cloud-stock/stock")
// 获取注册中学的服务IP地址和端口号
public interface StockClient {

    /**
     * 远程调用Feign 客户端 对库存更新
     * @param productId
     * @param count
     * @return
     */
    @GetMapping("/{productId}/{count}")
    public Boolean updateStock(@PathVariable("productId") String productId,
                               @PathVariable("count") Integer count);
}
